#include<stdio.h>
#include<unistd.h>
#include<stdlib.h>
#include<sys/types.h>

int main()
{
    pid_t id=fork();
    if(id<0) return 1;
    else if(id==0)
    {
        while(1)
       {
           printf("I am child ... \n");
           sleep(1);
       }
    }
    else{
        int cnt=5;
        while(cnt)
        {
            printf("I am father, run times: %d\n", cnt--);
            sleep(1);
        }
        printf("I am father,dead!:%d\n",cnt--);
        exit(2);
    }
    return 0;
}